/**
 * 
 */
package com.hujun.common.memcached.connect;

import java.io.IOException;

import com.hujun.common.memcached.core.Memcached;
import com.hujun.common.memcached.core.SpyMemcached;

import net.spy.memcached.AddrUtil;
import net.spy.memcached.ConnectionFactoryBuilder;
import net.spy.memcached.MemcachedClient;


/**
 * @author Administrator
 *
 */
public class SycMemcachedManager extends MemcachedManager{
	
	public Memcached connect() throws IOException{
		ConnectionFactoryBuilder connectionFactoryBuilder = new ConnectionFactoryBuilder();
		connectionFactoryBuilder.setOpTimeout(opTimeout);
		connectionFactoryBuilder.setDaemon(true);
		MemcachedClient memcachedClient = new MemcachedClient(connectionFactoryBuilder.build(), AddrUtil.getAddresses(serverIps));
		memcached = new SpyMemcached(memcachedClient);
		return memcached;
	}
	
	
}
